<div class="row">
    <div class="col-lg-12">
        <div class="ibox">
            <div class="ibox-title">
                <h5>
                    <vc:i18n name="添加" namespace="addEventPoolManage"></vc:i18n>
                </h5>
                <div class="ibox-tools" style="top:10px;">
                    <button type="button" class="btn btn-white btn-sm" v-on:click="vc.goBack()">
                        <i class="fa fa-close"></i>返回
                    </button>
                </div>
            </div>
            <div class="ibox-content">
                <div class="form-group row">
                    <label class="col-sm-2 col-form-label text-right">
                        <vc:i18n name='事件规则' namespace='addEventPoolManage'></vc:i18n>
                    </label>
                    <div class="col-sm-10">
                        <select class="custom-select" v-model="addEventPoolManageInfo.ruleId">
                            <option selected disabled value="">{{vc.i18n('必填，请选择事件规则','addEventPoolManage')}}</option>
                            <option v-for="(item, index) in eventRuleList" :key="index" :value="item.ruleId">
                                {{item.ruleName}}
                            </option>
                        </select>
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-2 col-form-label text-right">
                        <vc:i18n name='事件类型' namespace='addEventPoolManage'></vc:i18n>
                    </label>
                    <div class="col-sm-10">
                        <select class="custom-select" v-model="addEventPoolManageInfo.eventType">
                            <option selected disabled value="">{{vc.i18n('必填，请选择事件类型','addEventPoolManage')}}</option>
                            <option v-for="(item, index) in eventTypeList" :key="index" :value="item.statusCd">
                                {{item.name}}
                            </option>
                        </select>
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-2 col-form-label text-right">
                        <vc:i18n name='事件描述' namespace='addEventPoolManage'></vc:i18n>
                    </label>
                    <div class="col-sm-10">
                        <textarea v-model="addEventPoolManageInfo.eventMsg" :placeholder="vc.i18n('必填，请填写事件描述','addEventPoolManage')" class="form-control" rows="3"></textarea>
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-2 col-form-label text-right">
                        <vc:i18n name='对象类型' namespace='addEventPoolManage'></vc:i18n>
                    </label>
                    <div class="col-sm-10">
                        <select class="custom-select" v-model="addEventPoolManageInfo.objType" @change="queryMachineByObjType()">
                            <option selected disabled value="">{{vc.i18n('必填，请选择对象类型','addEventPoolManage')}}</option>
                            <option v-for="(item, index) in objTypeList" :key="index" :value="item.statusCd">
                                {{item.name}}
                            </option>
                        </select>
                    </div>
                </div>
                <div class="form-group row" v-if="iotMachineList.length !== 0 && addEventPoolManageInfo.objType !== ''">
                    <label class="col-sm-2 col-form-label text-right">
                        <vc:i18n name='设备对象' namespace='addEventPoolManage'></vc:i18n>
                    </label>
                    <div class="col-sm-9">
                        <textarea v-model="objectNameOnlyView" type="text" disabled rows="10"
                            :placeholder="vc.i18n('必填，请选择设备','addEventPoolManage')" class="form-control">
                        </textarea>
                    </div>
                    <div class="col-sm-1">
                        <button type="button" class="btn btn-primary btn-sm" v-on:click="selectIotMachine()">选择</button>
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-2 col-form-label text-right">
                        <vc:i18n name='备注' namespace='addEventPoolManage'></vc:i18n>
                    </label>
                    <div class="col-sm-10">
                        <textarea v-model="addEventPoolManageInfo.remark" :placeholder="vc.i18n('选填，请填写备注','addEventPoolManage')" class="form-control" rows="3"></textarea>
                    </div>
                </div>
                <div class="ibox-content">
                    <button class="btn btn-primary float-right" type="button" v-on:click="saveEventPoolManageInfo()">
                        <i class="fa fa-check"></i>&nbsp;
                        <vc:i18n name="保存"></vc:i18n>
                    </button>
                </div>
            </div>
        </div>
    </div>
</div>
    <vc:create path="event/chooseIotMachine" emitChooseIotMachine="" emitLoadData=""></vc:create>